//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#include <tmf_constants.h>
#include <tmf_macros.h>
#define __THIS_FILE__ "editor\fn_task.sqf"

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_taskDetails","_taskTitle","_taskDesc","_taskWP","_taskStatus","_taskSuccessVar","_taskFailedVar","_taskFailedInvertVar","_params"];
DEFAULT_PARAM(_taskTitle,0,"");
DEFAULT_PARAM(_taskDesc,1,ARR_2("STR_TYR_TASKNODESC",_taskTitle));
DEFAULT_PARAM(_taskStatus,2,"Created");
DEFAULT_PARAM(_taskWP,3,"");
DEFAULT_PARAM(_taskSuccessVar,4,"");
DEFAULT_PARAM(_taskFailedVar,5,"");
DEFAULT_PARAM(_taskFailedInvertVar,6,"");

_taskDetails = [];
SETVAL(_taskDetails, 0,_taskTitle);
SETVAL(_taskDetails, 1,_taskTitle);
SETVAL(_taskDetails, 2,_taskDesc);
SETVAL(_taskDetails, 3,MarkerText _taskWP);
SETVAL(_taskDetails, 4,MarkerPos _taskWP);
SETVAL(_taskDetails, 5,_taskStatus);
SETVAL(_taskDetails, 6,_taskSuccessVar);
SETVAL(_taskDetails, 7,_taskFailedVar);
SETVAL(_taskDetails, 8,_taskFailedInvertVar);

_params = [];
SETVAL(_params, 0,_taskDetails);
SETVAL(_params, 1,TMF_SERVER_INSTANCE_ID);
SETVAL(_params, 2,false);

_params call FFUNC(task);

TRACE("End");
TMFPROFILERSTOP;
nil;